package com.hd.abc.newcctv.web.controller;

import com.github.pagehelper.PageInfo;
import com.hd.abc.newcctv.servlet.ser;
import common.ResponseResult;
import common.ResultTable;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/emp")
public class conllera {
    @Autowired
    private ser ser;

    @RequestMapping("sign")
    @ResponseBody
    public ResponseResult tz(String username, String password){
        return ser.getdata(username,password);
    }
    @RequestMapping("/page")
    @ResponseBody
    public ResultTable pagelimit(@RequestParam(defaultValue = "1") int page,
                                 @RequestParam(defaultValue = "3") int limit){

        return  ser.getpage (page,limit);
    }
}
